<?php
	class SlideWidget extends CWidget
	{
		public function run()
		{
			$this->getslide();
		}
		public function getslide()
		{
			$slide_criteria = new CDbCriteria;
			$slide_criteria->select = 't.*';
			$slide_criteria->condition = 't.disabled=:active';
			$slide_criteria->params= array(':active' => 1);
			$slide_criteria->order = 't.priority ASC';
			$slide = Slide::model()->findAll($slide_criteria);
			$this->render('slide', compact('slide'));
		}
	}
?>